<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>服务</title>
    <link rel="stylesheet" href="../../public/base.css">
    <script src="../../public/angular.min.js"></script>
</head>
<body ng-app="myApp" ng-controller="myCtr">
    <p>
        <mark>使用angular提供的$location获取url</mark>{{url_}}
    </p>
    <p>
        <mark>$http加载内容，发起请求</mark>
    </p>
</body>
<script>
    var app=angular.module("myApp",[]);
    app.controller("myCtr",function ($scope,$location,$http,$sce) {
        $scope.url_=$location.absUrl();
        $http.get("./02repeat.html").then(function (response) {
            $scope.html_=(response.data);
        })
    });

</script>
</html>